// mircoApp/circleCommunity/circleSelect/circleSelect.js
const app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    circleId: 0,
    imgPath: app.globalData.imgPath,
    hiddenPlu: true
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.data.circleId = options.circleId;
    this.getCircleSet();
  },

  getCircleSet() {
    wx.showLoading({
      title: '加载中',
    });
    let urlStr = app.getNetAddresss("plugin.circle.frontend.circle.get-set");
    app._getNetWork({
      url: urlStr,
      data: {},
      success: (resdata) => {
        wx.hideLoading();
        var res = resdata.data;
        if (res.result != 1) return app.tips(res.msg);
        wx.setNavigationBarTitle({
          title: '发布'
        });
        this.setData({
          hiddenPlu: false
        });
      },
      fail: function (res) {
        wx.hideLoading();
        console.log(res);
      }
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {},

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {},

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {},

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {},

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {},

  gotoCircleTopic() {
    wx.navigateTo({
      url: "/mircoApp/circleCommunity/circleTopic/circleTopic?circleId=" + this.data.circleId,
    });
  },

  gotoCirclereleaseVideo() {
    wx.navigateTo({
      url: "/mircoApp/circleCommunity/circlereleaseVideo/circlereleaseVideo?circleId=" + this.data.circleId,
    });
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {},

  /**
   * 用户点击右上角分享
   */
  onShareTimeline(){},
  onShareAppMessage: function () {},
});
